 function search(){

		document.indexForm.submit();	 
	 }
function trim(val)
 {
	return val.replace(/(\s*$)/g, "");  
}

	function operation(operCode,tableName){//备份或还原

		document.getElementById('table_name').value = tableName+'|';
		document.indexForm.action="/doTradeReg.do";
		if(operCode == 1){//备份
			document.indexForm.action='/doTradeReg.do';
			document.getElementById('bpm_id').value = '0051';
		}else if(operCode == 2){//还原
			document.indexForm.action='/doTradeReg.do';
			document.getElementById('bpm_id').value = '0052';
		}
	document.indexForm.submit();
	}

			function operSel(opertype){//备份/还原所选
				var tableName = "";
				var listsize = document.getElementById("listsize").value;
				for(var i=0;i<listsize;i++){
					if(document.getElementById("checkone"+i).checked){
						tableName += document.getElementById("checkone"+i).value+"|";
					}
				}
				if(tableName==''){
					alert('请至少选择一张表');
					return;
				}else{
					document.indexForm.action="/doTradeReg.do";
					document.getElementById('table_name').value = tableName;
					if(opertype==1){//备份
						document.getElementById('bpm_id').value = '0051';
					}else if(opertype==2){//还原
						document.getElementById('bpm_id').value = '0052';
					}
					document.indexForm.submit();
				}
			}
			
	function restore(){//恢复数据库,每次只能恢复一个文件
 
				var tableName = "";
				var listsize = document.getElementById("listsize").value;
				for(var i=0;i<listsize;i++){
					if(document.getElementById("checkone"+i).checked){
						tableName += document.getElementById("checkone"+i).value+"|";
					}
				}
			  	if(tableName==''){
			  		alert('请选择备份的数据库！');
			  		return false;
			  	}  
				document.getElementById('backup_dbname').value = tableName;
				document.indexForm.submit();
			}			